package com.lanchetech.common.enums;

import lombok.Getter;

@Getter
public enum OrdersStatusEnum {
    UNPAY((byte) 0, "未付款"),
    CANCEL((byte) 1, "已取消"),
    PAID((byte) 2, "已付款"),
    COMMENT((byte) 3, "待评价"),
    DONE((byte) 4, "已完成"),
    CLOSE((byte) 5, "已关闭"),
    ;

    private Byte status;
    private String remark;

    OrdersStatusEnum(Byte status, String remark) {
        this.status = status;
        this.remark = remark;
    }

    public static String getRemarkByStatus(Byte status) {
        for (OrdersStatusEnum ordersStatus : OrdersStatusEnum.values()) {
            if (ordersStatus.getStatus().equals(status)) {
                return ordersStatus.getRemark();
            }
        }
        return "";
    }
}
